# -----------------------------------------------
# Author: yuz
# Copyright: 湖南零檬信息技术有限公司
# Email: wagyu2016@163.com
# Phone&Wechat: 18173179913
# Site: http://www.lemonban.com
# Forum: http://testingpai.com
# -----------------------------------------------
from configparser import ConfigParser


def read_parser(fspath, section, option):
    parser = ConfigParser()
    parser.read(fspath, encoding="utf-8")

    option = parser.get(section, option)
    return option

if __name__ == '__main__':
    data = read_parser("config.ini", 'db', 'host')
    print(data)